package com.datang.springcode.lazyBean;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Lazy;

@ComponentScan(value = "com.datang.springcode.lazyBean")

public class LazyConfig {
    @Bean(value = "schoolbag")
    @Lazy
    public Schoolbag getSchoolbag(){
        return new Schoolbag();
    }
}
